package com.cee.common.result;

import lombok.Getter;

/**
 * 统一返回结果状态信息类
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200,"成功"),
    FAIL(201, "失败"),
    PARAM_ERROR( 202, "参数不正确"),
    SERVICE_ERROR(203, "服务异常"),
    DATA_ERROR(204, "数据异常"),
    DATA_UPDATE_ERROR(205, "数据版本异常"),

    LOGIN_AUTH(208, "未登陆"),
    PERMISSION(209, "没有权限"),

    CODE_ERROR(210, "验证码错误"),
//    LOGIN_MOBLE_ERROR(211, "账号不正确"),
    LOGIN_DISABLED_ERROR(212, "改用户已被禁用"),
    REGISTER_MOBLE_ERROR(213, "手机号已被使用"),
    LOGIN_AURH(214, "需要登录"),
    LOGIN_ACL(215, "没有权限"),

    URL_ENCODE_ERROR( 216, "URL编码失败"),
    ILLEGAL_CALLBACK_REQUEST_ERROR( 217, "非法回调请求"),
    FETCH_ACCESSTOKEN_FAILD( 218, "获取accessToken失败"),
    FETCH_USERINFO_ERROR( 219, "账号密码不正确!"),

    ERROR_801(801, "，文件上传错误，请重新上传"),
    ERROR_802(802, "，文件上传格式错误，请重新上传"),
    ERROR_803(803, "，文件上传类型不能空，请重新上传"),
    ERROR_804(804, "，文件上传题目、答案、选项不能空，请重新上传"),
    ERROR_805(805, "，文件上传题目、类型1，类型2在数据库不存在，请重新上传"),
    ERROR_806(806, "，EXCEL文件加密错误，请解密上传"),
    ERROR_807(807, "，题目类型必须为单选题、多选题、判断题、填空题、简答题，请重新上传"),


    ERROR_901(901, "手机号已存在，手机号不能重复"),
    ERROR_902(901, "该试卷已开始考试，不能更新、删除、新增操作"),

    //系统配置 1000开关
    SYS_ERR_01(1001,""),

    //SCH 2000
    SCH_ERR01(2001, "jobName '{}' and jobGroupName '{}' is Already exist"),
    ;


    private Integer code;
    private String message;

    private ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
